package com.sheyu.mall.auth.feign;

import com.sheyu.common.to.MemberLoginVo;
import com.sheyu.common.to.MemberRegistVo;
import com.sheyu.common.utils.R;
import com.sheyu.mall.auth.vo.SocialUser;
import com.sheyu.mall.auth.vo.UserLoginVo;
import com.sheyu.mall.auth.vo.UserRegistVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author sheyu
 * @date 2020/8/23 4:28 下午
 */
@FeignClient("member-service")
public interface MemberFeignService {

    @PostMapping("/member/member/regist")
    R register(@RequestBody UserRegistVo userRegistVo);

    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVo userLoginVo);

    @PostMapping(value = "/member/member/oauth2/login")
    R oauthLogin(@RequestBody SocialUser socialUser) throws Exception;
}
